<!-- 
 * 注册用户详情
 * @author: 
 * @since: 2022-05-17
 * registeredUserDetails.vue
-->
<template>
  <div class="register-user-details-container detailsPageBox">
    <div class="detailsMain">
      <div class="person" v-if="state.userInfo.userType === 'PERSON'">
        <registerUserInfo :userInfo="state.userInfo"></registerUserInfo>
      </div>
      <div class="company" v-if="state.userInfo.userType === 'COMPANY'">
        <companyInfo :userInfo="state.userInfo"></companyInfo>
      </div>
    </div>
  </div>
</template>

<script setup>
import { onMounted, onUnmounted, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { useStore } from 'vuex';
import { sessionstorage } from '@/utils/storage.js'
const router = useRouter();
const store = useStore();


const state = reactive({
  userInfo: {},//注册用户信息

})
state.userInfo = sessionstorage.get('registerUserInfo')


onMounted(() => {
  const level = router.currentRoute.value.meta.level
  store.dispatch('setting/setRouterCut', level);
})

onUnmounted(() => {
  store.dispatch('setting/setRouterCut', 2);
})

</script>

<style lang="scss" scoped>
.register-user-details-container {
  padding: 40px 20px 20px 80px;
}
</style>
